package com.baizhi.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@TableName("b_user")
public class User implements Serializable {
    @TableId(value="id",type = IdType.AUTO)
    private Integer id;
    @TableField(value="username")
    private String username;
    private String salt;
    private String password;
    @TableLogic
    private Integer deleted;
    @TableField(fill =FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
 @TableField(exist = false)
private List<Address> addresses;

    public User() {
    }

    public User(Integer id, String username, String salt, String password, Integer deleted) {
        this.id = id;
        this.username = username;
        this.salt = salt;
        this.password = password;
        this.deleted = deleted;
    }
}
